package com.zhdl.hardware.plc.siemens.repository;

import com.zhdl.common.ytools.callback.CommonCallback;

public interface SiemensPortCmdHandleDao {
    void addPort(String port);

    /**
     * 读取plc的值
     *
     * @param port     网口IP
     * @param address  寄存器地址
     * @param count    寄存器个数
     * @param callback 回调
     */
    void raedValueByAddress(String port, String address, int count, CommonCallback<String> callback);

    /**
     * 写入plc的值
     *
     * @param port    网口IP
     * @param address 寄存器地址
     * @param value   寄存器值
     */
    void writeValueByAddress(String port, String address, String value);

    void writeValuesByAddress(String port, String address, String value);

    void raedValueByAddress(String port, String slaveId, String address, int count, CommonCallback<String> callback);

    void writeValueByAddress(String port, String slaveId, String address, String value);

    void writeValuesByAddress(String port, String slaveId, String address, String value);

}
